"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var BaseService_1 = require('./BaseService');
var TokensDao_1 = require('../dao/TokensDao');
var TokensService = (function (_super) {
    __extends(TokensService, _super);
    function TokensService() {
        _super.call(this);
        this.tokensDao = new TokensDao_1.TokensDao();
    }
    TokensService.prototype.get = function (tokenStr, callback) {
        this.tokensDao.get(tokenStr, function (err, token) {
            var user = undefined;
            if (token) {
                user = token.user;
            }
            callback(err, user);
        });
    };
    return TokensService;
}(BaseService_1.BaseService));
exports.TokensService = TokensService;
